package com.weiqiao.mall.repository;

import com.weiqiao.base.dao.IBaseMongoDao;
import org.bson.Document;
import org.bson.conversions.Bson;

import java.util.List;

/**
 * 权益卡数据层接口
 */
public interface IEquityCardRepository extends IBaseMongoDao {
     int countNum(int company_id, Bson filter);

     List<String> findAllEquityCard(int company_id, Bson filter, Bson sort);

     boolean delEquity(int company_id, Bson filter, Document doc);

     boolean updateState(int company_id, Document doc, Bson filter);

     boolean add(int company_id, String json);

     boolean updateEquityCard(int company_id, Bson filter, Document doc);

    /**
     * 通过条件获取单个权益卡对象
     *
     * @param company_id	公司id
     * @param filter		查询条件
     * @return str
     */
     String getOneEquityCardByFilter(int company_id, Bson filter);
}
